<extend name="Public/baseConf"/>
<block name="breadcrumb"> 
	<div class="row wrapper border-bottom white-bg page-heading">
	    <div class="col-lg-6">
	        <h2><present name="data">{:isset($info['id'])?'编辑':'新增'}后台菜单</h2>
	        <ol class="breadcrumb">
	            <li><a href="{:U('index/index')}">首页</a></li>
	            <li><a href="{:U('Menu/index')}">菜单管理</a></li>
	            <li class="active">
	                <strong>{:isset($info['id'])?'编辑':'新增'}后台菜单 </strong>
	            </li>
	        </ol>
	    </div>
	    <div class="col-lg-6">
            <div class="title-action">
 				<button class="btn btn-primary ajax-post" type="submit" target-form="form-horizontal"><i class="fa fa-check"></i>保存</button>
	            <a class="btn btn-warning" type="submit" href="{:U('index')}"><i class="fa fa-reply"></i>返回</a>
            </div>
        </div>
	</div>
</block>
<block name="body">
	<div class="row">
	    <div class="col-lg-12">
	        <div class="ibox float-e-margins">
	            <div class="ibox-title">
	                <h5>请在下表中填入信息<small></small></h5>
	                <div class="ibox-tools">
	                    <a class="collapse-link">
	                        <i class="fa fa-chevron-up"></i>
	                    </a>
	                </div>
	            </div>
	            <div class="ibox-content">
	                <form action="{:U()}"  method="post" class="form-horizontal">
	                    <div class="form-group"><label class="col-sm-3 control-label">标题<span class="check-tips">（用于后台显示的配置标题）</span></label>
	                        <div class="col-sm-9"><input type="text" name="title" value="{$info.title|default=''}" class="form-control"></div>
	                    </div>
						<div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-3 control-label">排序<span class="check-tips">（用于分组显示的顺序）</span></label>
	                        <div class="col-sm-9"><input type="text"  name="sort" value="{$info.sort|default=0}" class="form-control"></div>
	                    </div>
						<div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-3 control-label">链接<span class="check-tips">（U函数解析的URL或者外链）</span></label>
	                        <div class="col-sm-9"><input type="text" name="url" value="{$info.url|default=''}"  class="form-control"></div>
	                    </div>
						<div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-3 control-label">上级菜单<span class="check-tips">（所属的上级菜单）</span></label>
	                        <div class="col-sm-9">
	                        	<select name="pid" class="form-control" >
				                    <volist name="Menus" id="menu">
				                        <option value="{$menu.id}" <if condition="$info['pid'] eq $menu['id']">selected</if>>
				                        {$menu.title_show}
				                        </option>
				                    </volist>
			                	</select>
			                </div>
	                    </div>
						<div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-3 control-label">分组<span class="check-tips">（用于左侧分组二级菜单）</span></label>
	                        <div class="col-sm-9"><input type="text" name="group" value="{$info.group|default=''}" class="form-control"></div>
	                    </div>
						<div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-3 control-label">是否隐藏</label>
	                        <div class="col-sm-9">
	                       		<div class="radio radio-info radio-inline">
                   					<input id="hide1" name="hide" type="radio" value="1" <if condition="$info.hide eq 1">checked="checked"</if>>
                                    <label for="hide1">是</label>
                                </div>
	                       		<div class="radio radio-info radio-inline">
                   					<input id="hide0" name="hide" type="radio" value="0" <if condition="$info.hide eq 0">checked="checked"</if>>
                                    <label for="hide0">否</label>
                                </div>
							</div>
	                    </div>
						<div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-3 control-label">仅开发者模式可见<span class="check-tips"></span></label>
	                        <div class="col-sm-9">
	                       		<div class="radio radio-info radio-inline">
                   					<input id="is_dev1" name="is_dev" type="radio" value="1" <if condition="$info.is_dev eq 1">checked="checked"</if>/>
                                    <label for="is_dev1">是</label>
                                </div>
	                       		<div class="radio radio-info radio-inline">
                   					<input id="is_dev0" name="is_dev" type="radio" value="0" <if condition="$info.is_dev eq 0">checked="checked"</if>/>
                                    <label for="is_dev0">否</label>
                                </div>
							</div>
	                    </div>
						<!-- <div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-3 control-label">类别</label>
	                        <div class="col-sm-9">
	                       		<div class="radio radio-info radio-inline">
                   					<input id="issysfunction1" name="issysfunction" type="radio" value="1" <if condition="$info.issysfunction eq 1">checked="checked"</if>/>
                                    <label for="issysfunction1">系统功能</label>
                                </div>
	                       		<div class="radio radio-info radio-inline">
                   					<input id="issysfunction0" name="issysfunction" type="radio" value="0" <if condition="$info.issysfunction eq 0">checked="checked"</if>/>
                                    <label for="issysfunction0">自定义功能</label>
                                </div>
							</div>
	                    </div> -->
						<div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-3 control-label">说明<span class="check-tips">（菜单详细说明）</span></label>
	                        <div class="col-sm-9"><input type="text" name="tip" value="{$info.tip|default=''}" class="form-control"></div>
	                    </div> 
						<div class="form-group"><label class="col-sm-3 control-label">菜单图标</label>
	                        <div class="col-sm-9">
	                       		<div class="radio radio-info radio-inline">
                   					<input id="iconcss0" name="iconcss" type="radio" value="fa fa-desktop"  <if condition="$info.iconcss eq 'fa fa-desktop'">checked="checked"</if>/>
                   					<label for="iconcss0"><i class='fa fa-desktop'></i></label>
                                </div>
	                       		<div class="radio radio-info radio-inline">
	                       			<input id="iconcss1" name="iconcss" type="radio" value="fa fa-users" <if condition="$info.iconcss eq 'fa fa-users'">checked="checked"</if>/>
	                       			<label for="iconcss1"><i class='fa fa-users'></i></label>
                                </div>
	                       		<div class="radio radio-info radio-inline">
	                       			<input id="iconcss2" name="iconcss" type="radio" value="fa fa-list-alt" <if condition="$info.iconcss eq 'fa fa-list-alt'">checked="checked"</if>/>
	                       			<label for="iconcss2"><i class='fa fa-list-alt'></i></label>
                                </div>
	                       		<div class="radio radio-info radio-inline">
	                       			<input id="iconcss3" name="iconcss" type="radio" value="fa fa-list" <if condition="$info.iconcss eq 'fa fa-list'">checked="checked"</if>/>
	                       			<label for="iconcss3"><i class='fa fa-list'></i></label>
                                </div>
	                       		<div class="radio radio-info radio-inline">
	                       			<input id="iconcss4" name="iconcss" type="radio" value="fa fa-gavel" <if condition="$info.iconcss eq 'fa fa-gavel'">checked="checked"</if>/>
	                       			<label for="iconcss4"><i class='fa fa-gavel'></i></label>
                                </div>
	                       		<div class="radio radio-info radio-inline">
	                       			<input id="iconcss5" name="iconcss" type="radio" value="fa fa-cog" <if condition="$info.iconcss eq 'fa fa-cog'">checked="checked"</if>/>
	                       			<label for="iconcss5"><i class='fa fa-cog'></i></label>
                                </div>
                                <div class="radio radio-info radio-inline">
	                       			<input id="iconcss6" name="iconcss" type="radio" value="fa fa-dashboard" <if condition="$info.iconcss eq 'fa fa-dashboard'">checked="checked"</if>/>
	                       			<label for="iconcss6"><i class='fa fa-dashboard'></i></label>
                                </div>
                                <div class="radio radio-info radio-inline">
	                       			<input id="iconcss7" name="iconcss" type="radio" value="fa fa-pie-chart" <if condition="$info.iconcss eq 'fa fa-pie-chart'">checked="checked"</if>/>
	                       			<label for="iconcss7"><i class='fa fa-pie-chart'></i></label>
                                </div>
                                <div class="radio radio-info radio-inline">
	                       			<input id="iconcss8" name="iconcss" type="radio" value="fa fa-sitemap" <if condition="$info.iconcss eq 'fa fa-sitemap'">checked="checked"</if>/>
	                       			<label for="iconcss8"><i class='fa fa-sitemap'></i></label>
                                </div>
                                <div class="radio radio-info radio-inline">
	                       			<input id="iconcss9" name="iconcss" type="radio" value="fa fa-globe" <if condition="$info.iconcss eq 'fa fa-globe'">checked="checked"</if>/>
	                       			<label for="iconcss9"><i class='fa fa-globe'></i></label>
                                </div>
                                <div class="radio radio-info radio-inline">
	                       			<input id="iconcss10" name="iconcss" type="radio" value="fa fa-th-large" <if condition="$info.iconcss eq 'fa fa-th-large'">checked="checked"</if>/>
	                       			<label for="iconcss10"><i class='fa fa-th-large'></i></label>
                                </div>
							</div>
	                    </div>
						<div class="hr-line-dashed"></div>
 						<input type="hidden" name="id" value="{$info.id|default=''}"> 
	                </form>
	            </div>
	        </div>
	    </div>
	</div> 
</block>

<block name="script">
    <script type="text/javascript">
 
        Think.setValue("pid", {$info.pid|default = 0});
        Think.setValue("hide", {$info.hide|default = 0});
        Think.setValue("is_dev", {$info.is_dev|default = 0});
        Think.setValue("iconcss", {$info.iconcss|default ='fa fa-desktop'});
    </script>
</block>